import java.util.Scanner;

public class Text2 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        String ret = "";
        String cur = "";
        int i = 0;
        for(;i < str.length();i++) {
            char ch = str.charAt(i);
            if(ch >= '0' && ch <= '9') {
                cur = cur + ch+"";
            }else{
                if(ret.length() < cur.length()) {
                    ret = cur;
                }
                cur = "";
            }
        }

        if(i== str.length() && ret.length()< cur.length()) {
            ret = cur;
        }
        System.out.println(ret);
    }
}